package cn.slahser.tools;

import java.sql.Connection;
import java.sql.DriverManager;

public class DbHelper {

	public DbHelper() {
		super();
	}

	private static DbHelper db = new DbHelper();

	public static DbHelper getDb() {
		return db;
	}

	public Connection getConn() throws Exception {
		Class.forName(ServerConfig.getValue("database.driverClass"));
		return DriverManager.getConnection(
				ServerConfig.getValue("database.url"),
				ServerConfig.getValue("database.username"),
				ServerConfig.getValue("database.password"));
	}

}
